package com.wing.product.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.wing.mybatis.common.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

@Schema(description="生产计划表")
@Data
@EqualsAndHashCode(callSuper=true)
@TableName(value = "warehouse_production_scheduling_plan")
public class WarehouseProductionSchedulingPlan extends BaseEntity<WarehouseProductionSchedulingPlan> {

    @TableField(value = "production_plan_code")
    @Schema(description="生产加计划编号")
    private String productionPlanCode;

    @TableField(value = "product_id")
    @Schema(description="生产产品id")
    private Long productId;

    @TableField(value = "product_code")
    @Schema(description="客户产品料号")
    private String productCode;

    @TableField(value = "planned_quantity")
    @Schema(description="计划生产数量")
    private Integer plannedQuantity;

    @TableField(value = "completed_quantity")
    @Schema(description="已完成数量")
    private Integer completedQuantity;

    @TableField(value = "production_order_id")
    @Schema(description="所属生产订单id")
    private Long productionOrderId;

    @TableField(value = "customer_id")
    @Schema(description="客户id")
    private Long customerId;

    @TableField(value = "delivery_time")
    @Schema(description="计划交货时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime deliveryTime;

    @TableField(value = "product_variety_id")
    @Schema(description="品种id")
    private Long productVarietyId;

    @TableField(value = "product_spec_code")
    @Schema(description="规格")
    private String productSpecCode;

    @TableField(value = "required_quantity")
    @Schema(description="需求数")
    private Integer requiredQuantity;

    @TableField(value = "diameter")
    @Schema(description="厚度/壁厚/直径")
    private String diameter;

    @TableField(value = "width")
    @Schema(description="宽度/外径")
    private String width;

    @TableField(value = "length")
    @Schema(description="长度")
    private String length;

    @TableField(value = "processing_drawing")
    @Schema(description="图纸")
    private String processingDrawing;

    @TableField(value = "material_number")
    @Schema(description="材料料号")
    private String materialNumber;

    @TableField(value = "status")
    @Schema(description="状态1.待审核，2.待激活，3.待领料，4.待报工，5.生产中，6.暂停，7.终止，8.完成")
    private String status;

    @TableField(value = "sys_bundle_list")
    @Schema(description="系统唯一码集合")
    private String sysBundleList;

    @TableField(value = "processing_report_number")
    @Schema(description="报工数量")
    private Integer processingReportNumber;

    @TableField(value = "quality_testing_qualified_number")
    @Schema(description="质检合格数")
    private Integer qualityTestingQualifiedNumber;

    @TableField(value = "quality_testing_unqualified_number")
    @Schema(description="质检不合格数")
    private Integer qualityTestingUnqualifiedNumber;

    @TableField(value = "finished_product_number")
    @Schema(description="成品入库数")
    private Integer finishedProductNumber;

    @TableField(value = "product_brand_id")
    @Schema(description="品牌id")
    private Long productBrandId;

    @TableField(value = "product_producer_id")
    @Schema(description="生产商id")
    private Long productProducerId;

    @TableField(value = "product_mark_id")
    @Schema(description="牌号id")
    private Long productMarkId;

    @TableField(value = "production_line_id")
    @Schema(description="产线id")
    private Long productionLineId;

    @TableField(value = "processing_type")
    @Schema(description="加工类型")
    private Long processingType;

}
